package com.youlai.system.converter;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.youlai.system.pojo.entity.ExampleStudent;
import com.youlai.system.pojo.form.StudentForm;
import com.youlai.system.pojo.vo.StudentPageVO;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;

/**
 * 各种Bean之间的转换器
 */
@Mapper(componentModel = "spring")
public interface StudentConverter {

    Page<StudentPageVO> entityToPage(Page<ExampleStudent> page);

    StudentForm entityToForm(ExampleStudent exampleStudent);


    @InheritInverseConfiguration(name="entityToForm")
    ExampleStudent formToEntity(StudentForm studentForm);
}
